/**
 * Created by Administrator on 2017/9/22.
 */
import { observable, computed, action } from 'mobx';
import ModelPicture from '../modal/modalPicture.js';

export default class TodoListModel {
  @observable redTitle = '';
  @observable bigTitle = '';
  @observable pictureList = [];


  @computed
  get npm() {
    return this.todos.filter(todo => !todo.finished).length;
  }

  @action addList() {
    this.redTitle = '';
    this.bigTitle = '';
    this.pictureList = [];
  }

  @action addPicture() {
    const newPicture = new ModelPicture();
    this.pictureList.push(newPicture);
  }

  @action setRedTitle(text) {
    this.redTitle = text;
  }
  @action setBigTitle(text) {
    this.bigTitle = text;
  }


}
